new Vue({
	el: "#app",
	data: {
		iconImgUrl: "https://app.meijiangzi.com/static/",
		ImgBaseUrl: "https://app.meijiangzi.com/static/mini_",
		active_r: !0,
		active_o: !1,
		borbtom: !1,
		page_r: 1,
		page_o: 1,
		pageSize: 4,
		dataList_res: [],
		dataList_obj: [],
		resListOrResNull: "resNullShow",
		objListOrObjNull: "objNullShow",
		stopLoadFlag_r: !0,
		stopLoadFlag_o: !0,
		isExcute:false 
	},
	methods: {
		getReserData: function() {
			var t = this;
			wx.showLoading({
				title: "加载中...",
				mask: !0
			}), this.$http.post(baseUrl + "/api/mjz/projectOrder/list", {
				// page: this.page_r,
				// pageSize: this.pageSize
			}).then(function(a) {
				var s = a.data;
				if (s.success) {
					if (wx.hideLoading(), 0 == s.data.length && 1 == t.page_r) t.resListOrResNull = "resNullShow"; else if (t.resListOrResNull = "resListShow", 
					s.data.length > 0 && 1 == t.page_r) {
						t.dataList_res = s.data;
					} else if (s.data.length > 0 && t.page_r > 1) {
						(l = t.dataList_res).push.apply(l, o()(r));
					} else if (0 == s.data.data.length && t.page_r > 1) return t.stopLoadFlag_r = !1, 
					!1;
					isExcute=true;
				} else {
				  if (s.code = '0014'){
					return wx.hideLoading(), wx.showToast({
					  title: "请点击-我的-进行登录",
					  icon: "none",
					  duration: 1500,
					  mask: !0,
					  success: function (t) { }
					});
				  }else{
					return wx.hideLoading(), wx.showToast({
					  title: s.description,
					  icon: "none",
					  duration: 2e3,
					  mask: !0
					}), !1;
				  }
				}
			}).catch(function(t) {
				wx.hideLoading(), wx.showToast({
					title: "网络错误，请检查网络",
					icon: "none",
					duration: 2e3,
					mask: !0
				});
			});
		},
		getObjData: function() {
			var t = this;
			wx.showLoading({
				title: "加载中...",
				mask: !0
			}), this.$http.post(baseUrl + "/mjz/points/api/list", {
			  currentPage: this.page_o,
			  pageSize: this.pageSize,
			  roleCodes:['normal']
			}).then(function(a) {
				wx.hideLoading();
				var s = a.data;
				if (s.success) {
					if (0 == s.data.length && 1 == t.page_o) t.objListOrObjNull = "objNullShow"; else if (t.objListOrObjNull = "objListShow", 
					s.data.length > 0 && 1 == t.page_o) t.dataList_obj = s.data; else if (s.data.length > 0 && t.page_o > 1) {
						var i, e = s.data;
						(i = t.dataList_obj).push.apply(i, o()(e));
					} else if (0 == s.data.length && t.page_o > 1) return t.stopLoadFlag_o = !1, 
					!1;
					isExcute=true;
				} else {
				  if (s.code = '0014') {
					return wx.showToast({
					  title: "请点击-我的-进行登录",
					  icon: "none",
					  duration: 1500,
					  mask: !0,
					  success: function (t) { }
					});
				  } else {
					return wx.hideLoading(), wx.showToast({
					  title: s.description,
					  icon: "none",
					  duration: 2e3,
					  mask: !0
					}), !1;
				  }
				}
			}).catch(function(t) {
				wx.hideLoading(), wx.showToast({
					title: "网络错误，请检查网络",
					icon: "none",
					duration: 2e3,
					mask: !0
				});
			});
		},
		reserBillClik: function() {
			wx.setStorageSync("project_order", "resListShow"), console.log(wx.getStorageSync("project_order")), 
			this.active_r = !0, this.active_o = !1;
		},
		objBillClik: function() {
			wx.setStorageSync("project_order", "objListShow"), console.log(wx.getStorageSync("project_order")), 
			this.active_r = !1, this.active_o = !0;
		},
		gotoCertification: function() {
			// wx.navigateTo({
			//     url: "/pages/identification/main"
			// });
		},
		gotoEvaluateBooking: function(t) {
			wx.navigateTo({
				url: "/pages/evaluation_booking/main?id=" + t.id
			});
		},
		gotoEvaluateSubsidy: function(t) {
			wx.navigateTo({
				url: "/pages/evaluation_subsidy/main?id=" + t.id
			});
		},
		delReserData: function(t, a) {
			
		},
		gotoReserMore: function(t) {
			Jump.to(page.order.projectOrderDetail, "str=" + t.orderNo)
		},
		gotoObjMore: function(t) {
			// wx.navigateTo({
			//     url: "/pages/bt_order_detail/main?str=" + t.id
			// });
		},
		pullrefresh: function(t) {
			this.stopLoadFlag_r && "1" == t ? (this.page_r++, this.getReserData()) : this.stopLoadFlag_r || "1" != t || wx.showToast({
				title: "已经到最底下了^_^",
				icon: "none",
				duration: 1e3,
				mask: !0
			}), this.stopLoadFlag_o && "2" == t ? (this.page_o++, this.getObjData()) : this.stopLoadFlag_o || "2" != t || wx.showToast({
				title: "已经到最底下了^_^",
				icon: "none",
				duration: 1e3,
				mask: !0
			});
		},
		parsing: function(t) {
			for (var a = 0; a < this.dataList.length; a++) {
				var s = new Date(parseFloat(this.dataList[a].created_at)), i = (s.getMonth() + 1 < 10 ? "0" + (s.getMonth() + 1) : s.getMonth() + 1) + "月", e = s.getDate() + "日";
				this.dataList[a].month = i, this.dataList[a].day = e;
			}
		}
	},
	created: function() {
		var t = this;
		login._2page(page.order.projectOrder);
		"resListShow" == t.showName ? (wx.setStorageSync("project_order", "resListShow"), 
		this.active_r = !0, this.active_o = !1) : "objListShow" == t.showName && (wx.setStorageSync("project_order", "objListShow"), 
		this.active_r = !1, this.active_o = !0), this.stopLoadFlag_r = !0, this.stopLoadFlag_o = !0, 
		this.page_r = 1, this.page_o = 1, this.getReserData(), this.getObjData();
	}
});
